<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>使用CSS+jQuery实现的水平二级菜单 by www.865171.cn</title>
<style type="text/css">
body {
	font: 10px normal Verdana, Arial, Helvetica, sans-serif;
	margin: 0;
	padding: 0;
}
h1 {
	font: 4.7em normal Georgia, 'Times New Roman', Times, serif;
	color: #333;
	margin: 0;
	padding: 5px 0;
}
h1 small{
	font: 0.2em normal Verdana, Arial, Helvetica, sans-serif;
	text-transform:uppercase;
	letter-spacing: 1.5em;
	display: block;
	color: #fff;
}
.container {width: 970px; margin: 0 auto;}
ul#topnav {
	margin: 0; padding: 0;
	float: left;
	width: 970px;
	list-style: none;
	position: relative;
	font-size: 1.2em;
	/*background: url(topnav_stretch.gif) repeat-x;*/
	background: black;
}
ul#topnav li {
	float: left;
	margin: 0; padding: 0;
	border-right: 1px solid #555;
}
ul#topnav li a {
	padding: 10px 15px;
	display: block;
	color: #f0f0f0;
	text-decoration: none;
}
ul#topnav li:hover { background: #000 /*url(topnav_active.gif) repeat-x;*/ }
ul#topnav li span {
	float: left;
	padding: 15px 0;
	position: absolute;
	left: 0; top:35px;
	display: none;
	width: 970px;
	background: #1376c9;
	color: #fff;
	-moz-border-radius-bottomright: 5px;
	-khtml-border-radius-bottomright: 5px;
	-webkit-border-bottom-right-radius: 5px;
	-moz-border-radius-bottomleft: 5px;
	-khtml-border-radius-bottomleft: 5px;
	-webkit-border-bottom-left-radius: 5px;
}
ul#topnav li:hover span { display: block; }
ul#topnav li span a { display: inline; }
ul#topnav li span a:hover {text-decoration: underline;}
</style>
<script type="text/javascript" src="../js/jquery-1.3.2.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	
$("ul#topnav li").hover(function() { //Hover over event on list item
	$(this).css({ 'background' : '#1376c9 url(topnav_active.gif) repeat-x'}); //Add background color + image on hovered list item
	$(this).find("span").show(); //Show the subnav
} , function() { //on hover out...
	$(this).css({ 'background' : 'none'}); //Ditch the background
	$(this).find("span").hide(); //Hide the subnav
});
	
});
</script>
</head>

<body>

<div class="container">	
	<h1>使用CSS+jQuery实现的水平二级菜单</h1>
	<div style="clear: both; display: block; padding-bottom: 20px;"><a href="http://www.865171.cn/css-menu/" style="color: #1376c9;"><h3>www.865171.cn</h3></a></div>
    <ul id="topnav">
        <li><a href="http://www.865171.cn/">Home</a></li>
        <li>
            <a href="http://www.865171.cn/">About</a>
            <span>
                <a href="http://www.865171.cn/">The Company</a> |
                <a href="http://www.865171.cn/">The Team</a> |
                <a href="http://www.865171.cn/">Careers</a>
            </span>
        </li>
        <li>
            <a href="http://www.865171.cn/">Services</a>
            <span style="padding-left: 100px;">
                <a href="http://www.865171.cn/">What We Do</a> |
                <a href="http://www.865171.cn/">Our Process</a> |
                <a href="http://www.865171.cn/">Testimonials</a>
            </span>
        </li>
        <li>
            <a href="http://www.865171.cn/">Portfolio</a>
            <span  style="padding-left: 150px;">
                <a href="http://www.865171.cn/">Web Design</a> |
                <a href="http://www.865171.cn/">Development</a> |
                <a href="http://www.865171.cn/">Identity</a> |
                <a href="http://www.865171.cn/">SEO &amp; Internet Marketing</a> |
                <a href="http://www.865171.cn/">Print Design</a>
            </span>
        </li>
        <li><a href="http://www.865171.cn/">Contact</a></li>
    </ul>
	

</div>

</body>
</html>
